package cn.uce.cc.srv.service;

import cn.uce.cc.entity.CcAgent;
import cn.uce.cc.srv.dao.impl.ICcAgentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * Created by zhaocan on 2018/5/23.
 */
@Repository("ccAgentService")
public class CcAgentService {

    @Autowired
    private ICcAgentDao ccAgentDao;

    public CcAgent getCcAgentByUserId(String userId) {
        return ccAgentDao.getCcAgentByUserId(userId);
    }

    public int save(CcAgent ccAgent){
        return ccAgentDao.save(ccAgent);
    }

    public int updateByCode(CcAgent ccAgent){
        return ccAgentDao.updateByCode(ccAgent);
    }

    public CcAgent getCcAgentByOpenId(String openId) {
        return ccAgentDao.getCcAgentByOpenId(openId);
    }
}
